#include <iostream>
using namespace std;

int main() {
    int N;
    cin >> N;
    if (N == 1)
    {
        cout << "End";
        return 0;
    }
    while (N > 1)
    {
        int oldN = N;
        if (N % 2 == 0)
        {
            N = N / 2;
            cout << oldN << "/" << 2 << "=" << N << endl;
        }
        else {
            N = N * 3 + 1;
            cout << oldN << "*3+1" << "=" << N << endl;
        }
    }
    cout << "End";
    
    return 0;
}